# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        潘炎珍  
# Name:         demo06
# Description:
# Author:       98745
# Date:         2019/2/28
#-------------------------------------------------------------------------------

p1={'n':'pan','a':21,'f':['pan','yan']}
p2=p1.copy()
print('p1',p1)
print('p2',p2)
p2['a']=22
print('p1',p1)
print('p2',p2)
p2['f'][1]='zhen'
print('p1',p1)
print('p2',p2)

print('-----深层复制-----')
from copy import deepcopy
p1={'n':'pan','a':21,'f':['pan','yan']}
p2=p1.copy()
p3=deepcopy(p1)
p1['f'][1]='zhen'
print('p1',p1)
print('p2',p2)
print('p3',p3)
